/*
支付


options:{
	payType: 1-支付宝(电脑版) ,2-微信支付,3-支付宝(手机版),
	appid:支付接口appid,
	orderno:订单号,
	total:订单金额单位分,
	redirect:支付接口回跳页面
}
*/
function dopay(options) {

	var payfs = options.payType || 2;
	options.redirect = 'http%3A%2F%2Fwww.72gs.net%2F' + (options.redirect || 'wxpay%2Ftoken');

	switch (payfs) {
		case 2:
			//微信支付
			var orderno = options.orderno; //订单编号
			//	var total=1;  //金额

			//var total = options.total;
			var total=1;

			//var proName=$("#proName").val();  //商品名称

			//订单信息
			var payxinxi = orderno + ":" + total;
			//微信支付
			//location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx4930d0a8e3e8adce&redirect_uri=http%3A%2F%2Fwww.72gs.net%2Fwxpay%2Ftoken&response_type=code&scope=snsapi_base&state="+payxinxi+"#wechat_redirect";

			options.appid = (options.appid || "wx08e69fae39607f0f");
			location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx08e69fae39607f0f&redirect_uri=http%3A%2F%2Fwww.72gs.net%2Fwxpay%2Ftoken&response_type=code&scope=snsapi_base&state="+payxinxi+"#wechat_redirect";
		

			//location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + options.appid + "&redirect_uri=" + options.redirect + "&response_type=code&scope=snsapi_base&state=" + payxinxi + "#wechat_redirect";

			break;
		default:
			//支付宝  手机版
			//if(confirm("支付宝(手机版)处于调试阶段,可能无法完成支付,是否继续?")){
			$("#payfrom").attr('action', '/alipay/wap');
			//  return true;
			//}else return false;

			//return false;
			break;
	}

}